<div class="layui-form" lay-filter="layuiadmin-form-goods" style="padding: 20px 30px 0 0;">
    <div class="layui-form-item layui-row">
        <label class="layui-form-label">商品编码</label>
        <div class="layui-input-inline layui-col-md9">
            <script type="text/html" template>
                <input type="text" name="SPBM" value="{{ d.params.SPBM || '' }}" lay-verify="required|isExist"
                       placeholder="请输入商品编码" autocomplete="off" class="layui-input ">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">商品名称</label>
        <div class="layui-input-inline">
            <script type="text/html" template>
                <input type="text" name="SPMC" value="{{ d.params.SPMC || '' }}" lay-verify="required|isExist"
                       placeholder="请输入商品名称" autocomplete="off" class="layui-input">
            </script>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">有效标志</label>
        <div class="layui-input-inline">
            <script type="text/html" template="">
                <input type="radio" name="YXBZ" value="Y" title="是">
                <input type="radio" name="YXBZ" value="N" title="否">
            </script>

        </div>
    </div>
    <!--    <div class="layui-form-item">-->
    <!--        <label class="layui-form-label">录入人代码</label>-->
    <!--        <div class="layui-input-inline">-->
    <!--            <script type="text/html" template>-->
    <!--                <input type="text" name="LRR_DM" value="{{ d.params.LRR_DM || '' }}" lay-verify="required|isExist"-->
    <!--                       placeholder="请输入录入人代码" autocomplete="off" class="layui-input">-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--    <div class="layui-form-item">-->
    <!--        <label class="layui-form-label">录入日期</label>-->
    <!--        <div class="layui-input-inline">-->
    <!--            <script type="text/html" template>-->
    <!--                <input type="text" id="LRRQ" name="LRRQ" value="{{ d.params.LRRQ || '' }}" lay-verify="required|isExist"-->
    <!--                       class="layui-input">-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--    <div class="layui-form-item">-->
    <!--        <label class="layui-form-label">修改人代码</label>-->
    <!--        <div class="layui-input-inline">-->
    <!--            <script type="text/html" template>-->
    <!--                <input type="text" name="XGR_DM" value="{{ d.params.XGR_DM || '' }}" lay-verify="required|isExist"-->
    <!--                       placeholder="请输入修改人代码" autocomplete="off" class="layui-input">-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->
    <!--    <div class="layui-form-item">-->
    <!--        <label class="layui-form-label">修改日期</label>-->
    <!--        <div class="layui-input-inline">-->
    <!--            <script type="text/html" template>-->
    <!--                <input type="text" id="XGRQ" name="XGRQ" value="{{ d.params.XGRQ || '' }}" lay-verify="required|isExist"-->
    <!--                       class="layui-input">-->
    <!--            </script>-->
    <!--        </div>-->
    <!--    </div>-->

    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button" lay-submit lay-filter="LAY-goods-submit" value="确认" class="layui-btn mybtn"
            >
        </div>
    </div>
</div>
<script>
    layui.use(['form', 'laydate'], function () {
        var form = layui.form
            , laydate = layui.laydate
            , $ = layui.$
        $(".layui-form-label").css({"width": "140px"});

        // form.verify({
        //     isExist: function (value) {
        //         var params = $('.layui-input-inline input[name="roleName"]').val();
        //         debugger
        //         var data;
        //         $.ajax({
        //             url: 'http://172.20.10.12:8000/post/',
        //             beforeSend: function (XMLHttpRequest) {
        //                 XMLHttpRequest.setRequestHeader("Authorization", layui.data('layuiAdmin', 'Authorization'));
        //             },
        //             contentType: "application/json",
        //             dataType: 'json',
        //             type: "post",
        //             async: false,
        //             data: JSON.stringify({"name": params}),
        //             success: function (result) {
        //                 data = result
        //             },
        //         });
        //         if (false) {
        //             return '用户id已存在';
        //         }
        //
        //     }
        //
        // })
    })
</script>

